package com.core.website.service.impl;

import com.core.website.entity.CoreDutyRecordMonitoring;
import com.core.website.entity.CoreDutyRecordShiftChange;
import com.core.website.mapper.CoreDutyRecordShiftChangeMapper;
import com.core.website.service.CoreDutyRecordShiftChangeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Collections;
import java.util.List;
import java.util.UUID;

@Service
public class CoreDutyRecordShiftChangeServiceImpl implements CoreDutyRecordShiftChangeService {

    @Autowired
    CoreDutyRecordShiftChangeMapper dutyRecordShiftChangeMapper;
    @Override
    public String insertCoreDutyRecordShiftChange(CoreDutyRecordShiftChange dutyRecordShiftChange) {
        dutyRecordShiftChange.setId(UUID.randomUUID().toString().toUpperCase().replace("-", ""));
        dutyRecordShiftChangeMapper.insertCoreDutyRecordShiftChange(dutyRecordShiftChange);
        return dutyRecordShiftChange.getId();
    }

    @Override
    public List<CoreDutyRecordShiftChange> selectCoreDutyRecordShiftChangeList(String contentId) {
        return dutyRecordShiftChangeMapper.selectCoreDutyRecordShiftChangeList(contentId);
    }

    @Override
    public CoreDutyRecordShiftChange selectCoreDutyRecordShiftChangeById(String id) {
        return dutyRecordShiftChangeMapper.selectCoreDutyRecordShiftChangeById(id);
    }

    @Override
    public int updateCoreDutyRecordShiftChange(CoreDutyRecordShiftChange dutyRecordMonitoring) {
        return dutyRecordShiftChangeMapper.updateCoreDutyRecordShiftChange(dutyRecordMonitoring);
    }

    @Override
    public int deleteCoreDutyRecordShiftChangeById(String id) {
        return dutyRecordShiftChangeMapper.deleteCoreDutyRecordShiftChangeById(id);
    }
}
